<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NumCpp: Vec2.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NumCpp
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">A C++ implementation of the Python Numpy library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_vec2_8hpp_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Vec2.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_vec2_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_error_8hpp.html">NumCpp/Core/Error.hpp</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_nd_array_8hpp.html">NumCpp/NdArray.hpp</a>&quot;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="essentially_equal_8hpp.html">NumCpp/Utils/essentiallyEqual.hpp</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_utils_2interp_8hpp.html">NumCpp/Utils/interp.hpp</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;initializer_list&gt;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &lt;sstream&gt;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">//====================================================================================</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacenc.html">nc</a></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;{</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="comment">//================================================================================</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="comment">// Class Description:</span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html">   49</a></span>&#160;<span class="comment"></span>    <span class="keyword">class </span><a class="code" href="classnc_1_1_vec2.html">Vec2</a></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    {</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <span class="comment">//====================================Attributes==============================</span></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">   53</a></span>&#160;        <span class="keywordtype">double</span> <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a>{ 0.0 };</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">   54</a></span>&#160;        <span class="keywordtype">double</span> <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a>{ 0.0 };</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="comment"></span>        constexpr <a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>() noexcept = default;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#aeb48b0300990a5b77919589488ddfe30">   69</a></span>&#160;<span class="comment"></span>        constexpr <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(<span class="keywordtype">double</span> inX, <span class="keywordtype">double</span> inY) noexcept :</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a>(inX),</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a>(inY)</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        {}</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#abfb713c893dbd31d7c94b4741e82530b">   80</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html#abfb713c893dbd31d7c94b4741e82530b">Vec2</a>(<span class="keyword">const</span> std::initializer_list&lt;double&gt;&amp; inList)</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        {</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            <span class="keywordflow">if</span> (inList.size() != 2)</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <a class="code" href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a>(<span class="stringliteral">&quot;input initializer list must have a size = 2&quot;</span>);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            }</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> = *inList.begin();</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> = *(inList.begin() + 1);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a93a9f0c675265005a60c77179625ddd2">   97</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html#a93a9f0c675265005a60c77179625ddd2">Vec2</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a>&amp; ndArray)</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        {</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            <span class="keywordflow">if</span> (ndArray.<a class="code" href="classnc_1_1_nd_array.html#a6871de7968fa26f32d9c43167cd66131">size</a>() != 2)</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            {</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                <a class="code" href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a>(<span class="stringliteral">&quot;input NdArray must have a size = 2&quot;</span>);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            }</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> = ndArray[0];</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> = ndArray[1];</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        }</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a271ca2cae96a1df44486fbcc2c0f890f">  115</a></span>&#160;<span class="comment"></span>        <span class="keywordtype">double</span> <a class="code" href="classnc_1_1_vec2.html#a271ca2cae96a1df44486fbcc2c0f890f">angle</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; otherVec) <span class="keyword">const</span> noexcept</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        {</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            <span class="keywordtype">double</span> dotProduct = <a class="code" href="classnc_1_1_vec2.html#a231781cc06b8f005a1dda5003498ec99">dot</a>(otherVec);</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            dotProduct /= <a class="code" href="classnc_1_1_vec2.html#ab6922f6c089b20e9d019301fddc6dc0a">norm</a>();</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            dotProduct /= otherVec.norm();</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;            <span class="comment">// clamp the value to the acos range just to be safe</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;            dotProduct = <a class="code" href="namespacenc.html#a5273d0dac1896f082d185c7f0b90d99f">std::max</a>(<a class="code" href="namespacenc.html#a1dcd97ed6259f6a019ff8b59f2ae1adc">std::min</a>(dotProduct, 1.0), -1.0);</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            <span class="keywordflow">return</span> std::acos(dotProduct);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        }</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#abb0f6f8cacc680a464425d908e1e55cc">  135</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="classnc_1_1_vec2.html#abb0f6f8cacc680a464425d908e1e55cc">clampMagnitude</a>(<span class="keywordtype">double</span> maxLength) <span class="keyword">const</span> noexcept</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        {</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            <span class="keywordtype">double</span> magnitude = <a class="code" href="classnc_1_1_vec2.html#ab6922f6c089b20e9d019301fddc6dc0a">norm</a>();</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            <span class="keywordflow">if</span> (magnitude &lt;= maxLength)</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            {</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;            }</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;            <span class="keywordflow">else</span></div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;            {</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                <a class="code" href="classnc_1_1_vec2.html">Vec2</a> returnVec = <a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>(*this).normalize();</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                returnVec *= maxLength;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                <span class="keywordflow">return</span> returnVec;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;            }</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        }</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a63c2b2b7a16828af770d38176b6cb3aa">  157</a></span>&#160;<span class="comment"></span>        <span class="keywordtype">double</span> <a class="code" href="classnc_1_1_vec2.html#a63c2b2b7a16828af770d38176b6cb3aa">distance</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; otherVec) <span class="keyword">const</span> noexcept</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        {</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            <span class="keywordflow">return</span> (<a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>(*<span class="keyword">this</span>) -= otherVec).norm();</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        }</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a231781cc06b8f005a1dda5003498ec99">  169</a></span>&#160;<span class="comment"></span>        <span class="keywordtype">double</span> <a class="code" href="classnc_1_1_vec2.html#a231781cc06b8f005a1dda5003498ec99">dot</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; otherVec) <span class="keyword">const</span> noexcept</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        {</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> * otherVec.x + <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> * otherVec.y;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        }</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a265ae124776dd84b657c4ff6d7677352">  180</a></span>&#160;<span class="comment"></span>        <span class="keyword">static</span> constexpr <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="classnc_1_1_vec2.html#a265ae124776dd84b657c4ff6d7677352">down</a>() noexcept</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        {</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>(0.0, -1.0);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        }</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#ade3f4342726264a1493f91ae80ab24ca">  191</a></span>&#160;<span class="comment"></span>        <span class="keyword">static</span> constexpr <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="classnc_1_1_vec2.html#ade3f4342726264a1493f91ae80ab24ca">left</a>() noexcept</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        {</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>(-1.0, 0.0);</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        }</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a91e6417e5b9903ed6bee3ad90c0c38f4">  204</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="classnc_1_1_vec2.html#a91e6417e5b9903ed6bee3ad90c0c38f4">lerp</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; otherVec, <span class="keywordtype">double</span> t) <span class="keyword">const</span> noexcept</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        {</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            t = <a class="code" href="namespacenc.html#a5273d0dac1896f082d185c7f0b90d99f">std::max</a>(<a class="code" href="namespacenc.html#a1dcd97ed6259f6a019ff8b59f2ae1adc">std::min</a>(t, 1.0), 0.0);</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            <a class="code" href="classnc_1_1_vec2.html">Vec2</a> trajectory = otherVec;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            trajectory -= *<span class="keyword">this</span>;</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            <span class="keywordtype">double</span> xInterp = <a class="code" href="namespacenc_1_1utils.html#a691a52cfcc401340af355bd53869600e">utils::interp</a>(0.0, trajectory.<a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a>, t);</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            <span class="keywordtype">double</span> yInterp = <a class="code" href="namespacenc_1_1utils.html#a691a52cfcc401340af355bd53869600e">utils::interp</a>(0.0, trajectory.<a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a>, t);</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>(*<span class="keyword">this</span>) += <a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>(xInterp, yInterp);</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        }</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#ab6922f6c089b20e9d019301fddc6dc0a">  222</a></span>&#160;<span class="comment"></span>        <span class="keywordtype">double</span> <a class="code" href="classnc_1_1_vec2.html#ab6922f6c089b20e9d019301fddc6dc0a">norm</a>() const noexcept</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        {</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="namespacenc.html#a4648674053cd83851d9549bbcc7a8481">std::hypot</a>(<a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a>, <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a>);</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;        }</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a8d8a3ec28ef8336ab02dcd964a3e836c">  233</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="classnc_1_1_vec2.html#a8d8a3ec28ef8336ab02dcd964a3e836c">normalize</a>() const noexcept</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        {</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>(*<span class="keyword">this</span>) /= <a class="code" href="classnc_1_1_vec2.html#ab6922f6c089b20e9d019301fddc6dc0a">norm</a>();</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        }</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#aa5cb2f954360d7be97c443da16694383">  245</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="classnc_1_1_vec2.html#aa5cb2f954360d7be97c443da16694383">project</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; otherVec) <span class="keyword">const</span> noexcept</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        {</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            <span class="keywordtype">double</span> projectedMagnitude = <a class="code" href="classnc_1_1_vec2.html#ab6922f6c089b20e9d019301fddc6dc0a">norm</a>() * <a class="code" href="namespacenc.html#affd0f5b31b2bd1b9cea9ab54e25dfab2">std::cos</a>(<a class="code" href="classnc_1_1_vec2.html#a271ca2cae96a1df44486fbcc2c0f890f">angle</a>(otherVec));</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            <span class="keywordflow">return</span> otherVec.normalize() *= projectedMagnitude;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        }</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#ab84fdd231058aa0343e2249e209855bf">  257</a></span>&#160;<span class="comment"></span>        <span class="keyword">static</span> constexpr <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="classnc_1_1_vec2.html#ab84fdd231058aa0343e2249e209855bf">right</a>() noexcept</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        {</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>(1.0, 0.0);</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        }</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#aae1fa965b6d2d58638ae98c3e2cd834b">  268</a></span>&#160;<span class="comment"></span>        std::string <a class="code" href="classnc_1_1_vec2.html#aae1fa965b6d2d58638ae98c3e2cd834b">toString</a>() const noexcept</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        {</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            std::stringstream stream;</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;            stream &lt;&lt; <span class="stringliteral">&quot;Vec2[&quot;</span> &lt;&lt; <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> &lt;&lt; <span class="stringliteral">&quot;, &quot;</span> &lt;&lt; <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> &lt;&lt; <span class="stringliteral">&quot;]&quot;</span>;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;            <span class="keywordflow">return</span> stream.str();</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        }</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a774f9304228506198344275ea5ecad48">  281</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> <a class="code" href="classnc_1_1_vec2.html#a774f9304228506198344275ea5ecad48">toNdArray</a>() const noexcept</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        {</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;            <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;double&gt;</a> returnArray = { <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a>, <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> };</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;            <span class="keywordflow">return</span> returnArray.<a class="code" href="classnc_1_1_nd_array.html#aae29c9fbae3e92ce432703ffd7722d8b">transpose</a>();</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        }</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a82fc65cffdae5c0ebd50fece54b56d4c">  293</a></span>&#160;<span class="comment"></span>        <span class="keyword">static</span> constexpr <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="classnc_1_1_vec2.html#a82fc65cffdae5c0ebd50fece54b56d4c">up</a>() noexcept</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;        {</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">Vec2</a>(0.0, 1.0);</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        }</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#af04a7f20ae8ac7a59ae44f7819668fa0">  305</a></span>&#160;<span class="comment"></span>        <span class="keywordtype">bool</span> <a class="code" href="classnc_1_1_vec2.html#af04a7f20ae8ac7a59ae44f7819668fa0">operator==</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) <span class="keyword">const</span> noexcept</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        {</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="namespacenc_1_1utils.html#ab5d74e774cbc9596b129d7a507e58fe7">utils::essentiallyEqual</a>(<a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a>, rhs.x) &amp;&amp; <a class="code" href="namespacenc_1_1utils.html#ab5d74e774cbc9596b129d7a507e58fe7">utils::essentiallyEqual</a>(<a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a>, rhs.y);</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        }</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00317"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#ac83768c682c162ec9dffe1bfb9637338">  317</a></span>&#160;<span class="comment"></span>        <span class="keywordtype">bool</span> <a class="code" href="classnc_1_1_vec2.html#ac83768c682c162ec9dffe1bfb9637338">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) <span class="keyword">const</span> noexcept</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        {</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;            <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == rhs);</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;        }</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a21b1c9c0aa0b7e8886f1b4a7c255bb9e">  329</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; <a class="code" href="classnc_1_1_vec2.html#a21b1c9c0aa0b7e8886f1b4a7c255bb9e">operator+=</a>(<span class="keywordtype">double</span> scaler) noexcept</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        {</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> += scaler;</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> += scaler;</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;        }</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00343"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#af441d4bbee40c07f9b86fbd056ff637e">  343</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; <a class="code" href="classnc_1_1_vec2.html#af441d4bbee40c07f9b86fbd056ff637e">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) noexcept</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        {</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> += rhs.x;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> += rhs.y;</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;        }</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#abfb0b00888fa37d52a895d06f2b39133">  357</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; <a class="code" href="classnc_1_1_vec2.html#abfb0b00888fa37d52a895d06f2b39133">operator-=</a>(<span class="keywordtype">double</span> scaler) noexcept</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        {</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> -= scaler;</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> -= scaler;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;        }</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00371"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a13a2bbc2595248211e0bc97de51e13b5">  371</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; <a class="code" href="classnc_1_1_vec2.html#a13a2bbc2595248211e0bc97de51e13b5">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) noexcept</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        {</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> -= rhs.x;</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> -= rhs.y;</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;        }</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00385"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a72ac39ba88f909cb5552f6b379509f81">  385</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; <a class="code" href="classnc_1_1_vec2.html#a72ac39ba88f909cb5552f6b379509f81">operator*=</a>(<span class="keywordtype">double</span> scaler) noexcept</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        {</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> *= scaler;</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> *= scaler;</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        }</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        <span class="comment">//============================================================================</span></div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;        <span class="comment">// Method Description:</span></div><div class="line"><a name="l00399"></a><span class="lineno"><a class="line" href="classnc_1_1_vec2.html#a1a1c875b11ea5571cb2b71778a692472">  399</a></span>&#160;<span class="comment"></span>        <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; <a class="code" href="classnc_1_1_vec2.html#a1a1c875b11ea5571cb2b71778a692472">operator/=</a>(<span class="keywordtype">double</span> scaler) noexcept</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;        {</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">x</a> /= scaler;</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;            <a class="code" href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">y</a> /= scaler;</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        }</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    };</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00415"></a><span class="lineno"><a class="line" href="namespacenc.html#a9f50afa50b63aea110be8b9b477d1cb4">  415</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#ae2fdee927930fcd4ec7090935b7e689e">operator+</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; lhs, <span class="keywordtype">double</span> rhs) noexcept</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;    {</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(lhs) += rhs;</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;    }</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00428"></a><span class="lineno"><a class="line" href="namespacenc.html#a43fad0472de9a72d2680623200138907">  428</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#ae2fdee927930fcd4ec7090935b7e689e">operator+</a>(<span class="keywordtype">double</span> lhs, <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) noexcept</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    {</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(rhs) += lhs;</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    }</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="namespacenc.html#ab769651a09123be0a13a54a82aaa088a">  441</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#ae2fdee927930fcd4ec7090935b7e689e">operator+</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; lhs, <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) noexcept</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;    {</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(lhs) += rhs;</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;    }</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00452"></a><span class="lineno"><a class="line" href="namespacenc.html#a7c52ae6f5c5daf9d27c292e0451cccc3">  452</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#a2660b5b2e92a843a915a496dfe36ae9b">operator-</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; vec) noexcept</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;    {</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(-vec.x, -vec.y);</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    }</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00465"></a><span class="lineno"><a class="line" href="namespacenc.html#af29a28cada8fd30111a2c6d41a110ff8">  465</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#a2660b5b2e92a843a915a496dfe36ae9b">operator-</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; lhs, <span class="keywordtype">double</span> rhs) noexcept</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;    {</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(lhs) -= rhs;</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;    }</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;</div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00478"></a><span class="lineno"><a class="line" href="namespacenc.html#ad279cbad60173006f6883e0d18b0147e">  478</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#a2660b5b2e92a843a915a496dfe36ae9b">operator-</a>(<span class="keywordtype">double</span> lhs, <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) noexcept</div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;    {</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;        <span class="keywordflow">return</span> -<a class="code" href="classnc_1_1_vec2.html">Vec2</a>(rhs) += lhs;</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    }</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;</div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00491"></a><span class="lineno"><a class="line" href="namespacenc.html#a7cf1dfd7144b41f4d748af9fb8aa5ffb">  491</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#a2660b5b2e92a843a915a496dfe36ae9b">operator-</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; lhs, <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) noexcept</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    {</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(lhs) -= rhs;</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    }</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00504"></a><span class="lineno"><a class="line" href="namespacenc.html#a8248dae03ae96d459320f42d60fdf424">  504</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#a168110492e655659beb6531c6286fed2">operator*</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; lhs, <span class="keywordtype">double</span> rhs) noexcept</div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;    {</div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(lhs) *= rhs;</div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;    }</div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;</div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00517"></a><span class="lineno"><a class="line" href="namespacenc.html#a1769d68f44f9c98d94dd412bc32a9bb5">  517</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#a168110492e655659beb6531c6286fed2">operator*</a>(<span class="keywordtype">double</span> lhs, <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) noexcept</div><div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;    {</div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(rhs) *= lhs;</div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;    }</div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;</div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00531"></a><span class="lineno"><a class="line" href="namespacenc.html#ace6d6bf5d703e886d8f137cf73be5021">  531</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="namespacenc.html#a168110492e655659beb6531c6286fed2">operator*</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; lhs, <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; rhs) noexcept</div><div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;    {</div><div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        <span class="keywordflow">return</span> lhs.dot(rhs);</div><div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;    }</div><div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;</div><div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00544"></a><span class="lineno"><a class="line" href="namespacenc.html#abe2fc114afe7f62aacf55a9288f45c4a">  544</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a> <a class="code" href="namespacenc.html#aac70ac0e17668c49bb2cb63c3819c884">operator/</a>(<span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; lhs, <span class="keywordtype">double</span> rhs) noexcept</div><div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;    {</div><div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>(lhs) /= rhs;</div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;    }</div><div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;</div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;    <span class="comment">//============================================================================</span></div><div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;    <span class="comment">// Method Description:</span></div><div class="line"><a name="l00557"></a><span class="lineno"><a class="line" href="namespacenc.html#ac5bf4d5c39fe1087aafc7f94b6fb552b">  557</a></span>&#160;<span class="comment"></span>    <span class="keyword">inline</span> std::ostream&amp; <a class="code" href="namespacenc.html#a49514db60fa8b67548732fc4c5fa36e9">operator&lt;&lt;</a>(std::ostream&amp; stream, <span class="keyword">const</span> <a class="code" href="classnc_1_1_vec2.html">Vec2</a>&amp; vec) noexcept</div><div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;    {</div><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;        stream &lt;&lt; vec.toString() &lt;&lt; std::endl;</div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;        <span class="keywordflow">return</span> stream;</div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    }</div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;}</div><div class="ttc" id="classnc_1_1_vec2_html_ae8dbcf96e120e5316ecda8dd6e5deea7"><div class="ttname"><a href="classnc_1_1_vec2.html#ae8dbcf96e120e5316ecda8dd6e5deea7">nc::Vec2::Vec2</a></div><div class="ttdeci">constexpr Vec2() noexcept=default</div></div>
<div class="ttc" id="classnc_1_1_nd_array_html_aae29c9fbae3e92ce432703ffd7722d8b"><div class="ttname"><a href="classnc_1_1_nd_array.html#aae29c9fbae3e92ce432703ffd7722d8b">nc::NdArray::transpose</a></div><div class="ttdeci">NdArray&lt; dtype &gt; transpose() const noexcept</div><div class="ttdef"><b>Definition:</b> NdArrayCore.hpp:3953</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_abfb0b00888fa37d52a895d06f2b39133"><div class="ttname"><a href="classnc_1_1_vec2.html#abfb0b00888fa37d52a895d06f2b39133">nc::Vec2::operator-=</a></div><div class="ttdeci">Vec2 &amp; operator-=(double scaler) noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:357</div></div>
<div class="ttc" id="namespacenc_html_aac70ac0e17668c49bb2cb63c3819c884"><div class="ttname"><a href="namespacenc.html#aac70ac0e17668c49bb2cb63c3819c884">nc::operator/</a></div><div class="ttdeci">NdArray&lt; dtype &gt; operator/(const NdArray&lt; dtype &gt; &amp;inArray1, const NdArray&lt; dtype &gt; &amp;inArray2)</div><div class="ttdef"><b>Definition:</b> NdArrayOperators.hpp:379</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a82fc65cffdae5c0ebd50fece54b56d4c"><div class="ttname"><a href="classnc_1_1_vec2.html#a82fc65cffdae5c0ebd50fece54b56d4c">nc::Vec2::up</a></div><div class="ttdeci">static constexpr Vec2 up() noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:293</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_ad7a5bc1612f92f7e49112cf58caeaace"><div class="ttname"><a href="classnc_1_1_vec2.html#ad7a5bc1612f92f7e49112cf58caeaace">nc::Vec2::y</a></div><div class="ttdeci">double y</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:54</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a93a9f0c675265005a60c77179625ddd2"><div class="ttname"><a href="classnc_1_1_vec2.html#a93a9f0c675265005a60c77179625ddd2">nc::Vec2::Vec2</a></div><div class="ttdeci">Vec2(const NdArray&lt; double &gt; &amp;ndArray)</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:97</div></div>
<div class="ttc" id="_error_8hpp_html"><div class="ttname"><a href="_error_8hpp.html">Error.hpp</a></div></div>
<div class="ttc" id="namespacenc_html"><div class="ttname"><a href="namespacenc.html">nc</a></div><div class="ttdef"><b>Definition:</b> Coordinate.hpp:45</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_abfb713c893dbd31d7c94b4741e82530b"><div class="ttname"><a href="classnc_1_1_vec2.html#abfb713c893dbd31d7c94b4741e82530b">nc::Vec2::Vec2</a></div><div class="ttdeci">Vec2(const std::initializer_list&lt; double &gt; &amp;inList)</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:80</div></div>
<div class="ttc" id="essentially_equal_8hpp_html"><div class="ttname"><a href="essentially_equal_8hpp.html">essentiallyEqual.hpp</a></div></div>
<div class="ttc" id="namespacenc_html_a168110492e655659beb6531c6286fed2"><div class="ttname"><a href="namespacenc.html#a168110492e655659beb6531c6286fed2">nc::operator*</a></div><div class="ttdeci">NdArray&lt; dtype &gt; operator*(const NdArray&lt; dtype &gt; &amp;inArray1, const NdArray&lt; dtype &gt; &amp;inArray2)</div><div class="ttdef"><b>Definition:</b> NdArrayOperators.hpp:289</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a231781cc06b8f005a1dda5003498ec99"><div class="ttname"><a href="classnc_1_1_vec2.html#a231781cc06b8f005a1dda5003498ec99">nc::Vec2::dot</a></div><div class="ttdeci">double dot(const Vec2 &amp;otherVec) const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:169</div></div>
<div class="ttc" id="namespacenc_html_a2660b5b2e92a843a915a496dfe36ae9b"><div class="ttname"><a href="namespacenc.html#a2660b5b2e92a843a915a496dfe36ae9b">nc::operator-</a></div><div class="ttdeci">NdArray&lt; dtype &gt; operator-(const NdArray&lt; dtype &gt; &amp;inArray1, const NdArray&lt; dtype &gt; &amp;inArray2)</div><div class="ttdef"><b>Definition:</b> NdArrayOperators.hpp:183</div></div>
<div class="ttc" id="namespacenc_1_1utils_html_ab5d74e774cbc9596b129d7a507e58fe7"><div class="ttname"><a href="namespacenc_1_1utils.html#ab5d74e774cbc9596b129d7a507e58fe7">nc::utils::essentiallyEqual</a></div><div class="ttdeci">bool essentiallyEqual(dtype inValue1, dtype inValue2, dtype inEpsilon) noexcept</div><div class="ttdef"><b>Definition:</b> essentiallyEqual.hpp:50</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_aae1fa965b6d2d58638ae98c3e2cd834b"><div class="ttname"><a href="classnc_1_1_vec2.html#aae1fa965b6d2d58638ae98c3e2cd834b">nc::Vec2::toString</a></div><div class="ttdeci">std::string toString() const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:268</div></div>
<div class="ttc" id="namespacenc_html_a49514db60fa8b67548732fc4c5fa36e9"><div class="ttname"><a href="namespacenc.html#a49514db60fa8b67548732fc4c5fa36e9">nc::operator&lt;&lt;</a></div><div class="ttdeci">NdArray&lt; dtype &gt; operator&lt;&lt;(const NdArray&lt; dtype &gt; &amp;lhs, uint8 inNumBits) noexcept</div><div class="ttdef"><b>Definition:</b> NdArrayOperators.hpp:1432</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_ab84fdd231058aa0343e2249e209855bf"><div class="ttname"><a href="classnc_1_1_vec2.html#ab84fdd231058aa0343e2249e209855bf">nc::Vec2::right</a></div><div class="ttdeci">static constexpr Vec2 right() noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:257</div></div>
<div class="ttc" id="namespacenc_html_a5273d0dac1896f082d185c7f0b90d99f"><div class="ttname"><a href="namespacenc.html#a5273d0dac1896f082d185c7f0b90d99f">nc::max</a></div><div class="ttdeci">NdArray&lt; dtype &gt; max(const NdArray&lt; dtype &gt; &amp;inArray, Axis inAxis=Axis::NONE) noexcept</div><div class="ttdef"><b>Definition:</b> max.hpp:46</div></div>
<div class="ttc" id="_nd_array_8hpp_html"><div class="ttname"><a href="_nd_array_8hpp.html">NdArray.hpp</a></div></div>
<div class="ttc" id="namespacenc_html_a1dcd97ed6259f6a019ff8b59f2ae1adc"><div class="ttname"><a href="namespacenc.html#a1dcd97ed6259f6a019ff8b59f2ae1adc">nc::min</a></div><div class="ttdeci">NdArray&lt; dtype &gt; min(const NdArray&lt; dtype &gt; &amp;inArray, Axis inAxis=Axis::NONE) noexcept</div><div class="ttdef"><b>Definition:</b> min.hpp:46</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a63c2b2b7a16828af770d38176b6cb3aa"><div class="ttname"><a href="classnc_1_1_vec2.html#a63c2b2b7a16828af770d38176b6cb3aa">nc::Vec2::distance</a></div><div class="ttdeci">double distance(const Vec2 &amp;otherVec) const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:157</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a8d8a3ec28ef8336ab02dcd964a3e836c"><div class="ttname"><a href="classnc_1_1_vec2.html#a8d8a3ec28ef8336ab02dcd964a3e836c">nc::Vec2::normalize</a></div><div class="ttdeci">Vec2 normalize() const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:233</div></div>
<div class="ttc" id="_utils_2interp_8hpp_html"><div class="ttname"><a href="_utils_2interp_8hpp.html">interp.hpp</a></div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a36a67b9395b397e1b8e9364a39a5c458"><div class="ttname"><a href="classnc_1_1_vec2.html#a36a67b9395b397e1b8e9364a39a5c458">nc::Vec2::x</a></div><div class="ttdeci">double x</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:53</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a13a2bbc2595248211e0bc97de51e13b5"><div class="ttname"><a href="classnc_1_1_vec2.html#a13a2bbc2595248211e0bc97de51e13b5">nc::Vec2::operator-=</a></div><div class="ttdeci">Vec2 &amp; operator-=(const Vec2 &amp;rhs) noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:371</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_af441d4bbee40c07f9b86fbd056ff637e"><div class="ttname"><a href="classnc_1_1_vec2.html#af441d4bbee40c07f9b86fbd056ff637e">nc::Vec2::operator+=</a></div><div class="ttdeci">Vec2 &amp; operator+=(const Vec2 &amp;rhs) noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:343</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_ac83768c682c162ec9dffe1bfb9637338"><div class="ttname"><a href="classnc_1_1_vec2.html#ac83768c682c162ec9dffe1bfb9637338">nc::Vec2::operator!=</a></div><div class="ttdeci">bool operator!=(const Vec2 &amp;rhs) const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:317</div></div>
<div class="ttc" id="classnc_1_1_vec2_html"><div class="ttname"><a href="classnc_1_1_vec2.html">nc::Vec2</a></div><div class="ttdoc">Holds a 2D vector. </div><div class="ttdef"><b>Definition:</b> Vec2.hpp:49</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a91e6417e5b9903ed6bee3ad90c0c38f4"><div class="ttname"><a href="classnc_1_1_vec2.html#a91e6417e5b9903ed6bee3ad90c0c38f4">nc::Vec2::lerp</a></div><div class="ttdeci">Vec2 lerp(const Vec2 &amp;otherVec, double t) const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:204</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_ab6922f6c089b20e9d019301fddc6dc0a"><div class="ttname"><a href="classnc_1_1_vec2.html#ab6922f6c089b20e9d019301fddc6dc0a">nc::Vec2::norm</a></div><div class="ttdeci">double norm() const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:222</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_abb0f6f8cacc680a464425d908e1e55cc"><div class="ttname"><a href="classnc_1_1_vec2.html#abb0f6f8cacc680a464425d908e1e55cc">nc::Vec2::clampMagnitude</a></div><div class="ttdeci">Vec2 clampMagnitude(double maxLength) const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:135</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a774f9304228506198344275ea5ecad48"><div class="ttname"><a href="classnc_1_1_vec2.html#a774f9304228506198344275ea5ecad48">nc::Vec2::toNdArray</a></div><div class="ttdeci">NdArray&lt; double &gt; toNdArray() const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:281</div></div>
<div class="ttc" id="_error_8hpp_html_af2aff1172060367b9c5398fa097fa8fd"><div class="ttname"><a href="_error_8hpp.html#af2aff1172060367b9c5398fa097fa8fd">THROW_INVALID_ARGUMENT_ERROR</a></div><div class="ttdeci">#define THROW_INVALID_ARGUMENT_ERROR(msg)</div><div class="ttdef"><b>Definition:</b> Error.hpp:38</div></div>
<div class="ttc" id="namespacenc_html_a4648674053cd83851d9549bbcc7a8481"><div class="ttname"><a href="namespacenc.html#a4648674053cd83851d9549bbcc7a8481">nc::hypot</a></div><div class="ttdeci">double hypot(dtype inValue1, dtype inValue2) noexcept</div><div class="ttdef"><b>Definition:</b> hypot.hpp:57</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a1a1c875b11ea5571cb2b71778a692472"><div class="ttname"><a href="classnc_1_1_vec2.html#a1a1c875b11ea5571cb2b71778a692472">nc::Vec2::operator/=</a></div><div class="ttdeci">Vec2 &amp; operator/=(double scaler) noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:399</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_aa5cb2f954360d7be97c443da16694383"><div class="ttname"><a href="classnc_1_1_vec2.html#aa5cb2f954360d7be97c443da16694383">nc::Vec2::project</a></div><div class="ttdeci">Vec2 project(const Vec2 &amp;otherVec) const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:245</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a265ae124776dd84b657c4ff6d7677352"><div class="ttname"><a href="classnc_1_1_vec2.html#a265ae124776dd84b657c4ff6d7677352">nc::Vec2::down</a></div><div class="ttdeci">static constexpr Vec2 down() noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:180</div></div>
<div class="ttc" id="namespacenc_html_ae2fdee927930fcd4ec7090935b7e689e"><div class="ttname"><a href="namespacenc.html#ae2fdee927930fcd4ec7090935b7e689e">nc::operator+</a></div><div class="ttdeci">NdArray&lt; dtype &gt; operator+(const NdArray&lt; dtype &gt; &amp;inArray1, const NdArray&lt; dtype &gt; &amp;inArray2)</div><div class="ttdef"><b>Definition:</b> NdArrayOperators.hpp:93</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_ade3f4342726264a1493f91ae80ab24ca"><div class="ttname"><a href="classnc_1_1_vec2.html#ade3f4342726264a1493f91ae80ab24ca">nc::Vec2::left</a></div><div class="ttdeci">static constexpr Vec2 left() noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:191</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a271ca2cae96a1df44486fbcc2c0f890f"><div class="ttname"><a href="classnc_1_1_vec2.html#a271ca2cae96a1df44486fbcc2c0f890f">nc::Vec2::angle</a></div><div class="ttdeci">double angle(const Vec2 &amp;otherVec) const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:115</div></div>
<div class="ttc" id="namespacenc_html_affd0f5b31b2bd1b9cea9ab54e25dfab2"><div class="ttname"><a href="namespacenc.html#affd0f5b31b2bd1b9cea9ab54e25dfab2">nc::cos</a></div><div class="ttdeci">double cos(dtype inValue) noexcept</div><div class="ttdef"><b>Definition:</b> cos.hpp:50</div></div>
<div class="ttc" id="namespacenc_1_1utils_html_a691a52cfcc401340af355bd53869600e"><div class="ttname"><a href="namespacenc_1_1utils.html#a691a52cfcc401340af355bd53869600e">nc::utils::interp</a></div><div class="ttdeci">constexpr double interp(double inValue1, double inValue2, double inPercent) noexcept</div><div class="ttdef"><b>Definition:</b> Utils/interp.hpp:44</div></div>
<div class="ttc" id="classnc_1_1_nd_array_html_a6871de7968fa26f32d9c43167cd66131"><div class="ttname"><a href="classnc_1_1_nd_array.html#a6871de7968fa26f32d9c43167cd66131">nc::NdArray::size</a></div><div class="ttdeci">uint32 size() const noexcept</div><div class="ttdef"><b>Definition:</b> NdArrayCore.hpp:3614</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_af04a7f20ae8ac7a59ae44f7819668fa0"><div class="ttname"><a href="classnc_1_1_vec2.html#af04a7f20ae8ac7a59ae44f7819668fa0">nc::Vec2::operator==</a></div><div class="ttdeci">bool operator==(const Vec2 &amp;rhs) const noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:305</div></div>
<div class="ttc" id="classnc_1_1_nd_array_html"><div class="ttname"><a href="classnc_1_1_nd_array.html">nc::NdArray&lt; double &gt;</a></div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a72ac39ba88f909cb5552f6b379509f81"><div class="ttname"><a href="classnc_1_1_vec2.html#a72ac39ba88f909cb5552f6b379509f81">nc::Vec2::operator*=</a></div><div class="ttdeci">Vec2 &amp; operator*=(double scaler) noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:385</div></div>
<div class="ttc" id="classnc_1_1_vec2_html_a21b1c9c0aa0b7e8886f1b4a7c255bb9e"><div class="ttname"><a href="classnc_1_1_vec2.html#a21b1c9c0aa0b7e8886f1b4a7c255bb9e">nc::Vec2::operator+=</a></div><div class="ttdeci">Vec2 &amp; operator+=(double scaler) noexcept</div><div class="ttdef"><b>Definition:</b> Vec2.hpp:329</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_34171bd951b13a53aa9f237277a18e40.html">NumCpp</a></li><li class="navelem"><a class="el" href="dir_2e8552338a5fe196f81c9ab4a461b773.html">Vector</a></li><li class="navelem"><a class="el" href="_vec2_8hpp.html">Vec2.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
